#pragma once

class singleton
{
public:
    static singleton* instance();
    static void destruct()
    {
        if (m_instance)
        {
            delete m_instance;
        }
        
    }
private:
    singleton() = default;
    ~singleton() = default;
    singleton(const singleton&) = delete;
    singleton& operator=(const singleton&) = delete;

    static singleton* m_instance;
    static std::once_flag m_flag;
};